import { createRouter, createWebHistory } from "vue-router";

// 路由表
const routes = [
  {
    path: "/",
    component: () => import("@/views/Home/indexView.vue"),
    name: 'Home'
  },
  {
    path: "/edu",
    component: () => import("@/views/Edu/indexView.vue"),
    name: 'Edu'
  },
  {
    path: "/search",
    component: () => import("@/views/Search/indexView.vue"),
    name: 'Search'
  },
  {
    path: "/detail/:id",
    component: () => import("@/views/Detail/indexView.vue"),
    name: 'Detail',
    meta: {
      title: '详情'
    }
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
